﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    x:Class="DiagramCreator.Nodes.GenericNode"
    Height="131" Width="552">
	<UserControl.Resources>
		<SolidColorBrush x:Key="NodeBgFill" Color="#FF4493DD"/>
        <LinearGradientBrush x:Key="ToolTipBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0" Color="#FFFFFF"/>
            <GradientStop Offset="0.2" Color="#FCFDFE"/>
            <GradientStop Offset="0.6" Color="#E6EDF7"/>
            <GradientStop Offset="1" Color="#CBDAEF"/>
        </LinearGradientBrush>
        <Storyboard x:Key="GenericNodeMouseEnter">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewdecissionNode" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewActionNode" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewNoteNode" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="StopNode" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="StopNodeInner" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
		<Storyboard x:Key="GenericNodeMouseLeave">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewActionNode" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewdecissionNode" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="NewNoteNode" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="StopNode" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="StopNodeInner" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
		<LinearGradientBrush x:Key="NodeBgFillGradient" EndPoint="0.496,0.021" StartPoint="0.5,1.339" SpreadMethod="Reflect">
			<GradientStop Color="#FF7DA7CE" Offset="0"/>
			
			<GradientStop Color="#FFDDEEFD" Offset="0.75"/>
		</LinearGradientBrush>
        <LinearGradientBrush x:Key="NoteNodeBgFill" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0" Color="#FFFFFF"/>
            <GradientStop Offset="0.777" Color="#FFFDF0B6"/>
            <GradientStop Offset="1" Color="#FFFFFEE2"/>
            <GradientStop Offset="0" Color="#FFFEFEFC"/>
        </LinearGradientBrush>
		
	</UserControl.Resources>
	<UserControl.Triggers>
		<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="grid">
			<BeginStoryboard x:Name="GenericNodeMouseEnter_BeginStoryboard" Storyboard="{StaticResource GenericNodeMouseEnter}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="grid">
			<BeginStoryboard x:Name="GenericNodeMouseLeave_BeginStoryboard" Storyboard="{StaticResource GenericNodeMouseLeave}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="Mouse.MouseEnter">
			<BeginStoryboard Storyboard="{StaticResource GenericNodeMouseEnter}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="Mouse.MouseLeave">
			<BeginStoryboard x:Name="GenericNodeMouseLeave_BeginStoryboard1" Storyboard="{StaticResource GenericNodeMouseLeave}"/>
		</EventTrigger>
	</UserControl.Triggers>
    <Grid x:Name="grid">
    	<Rectangle Margin="0,0,0,0" Visibility="Hidden" Fill="{x:Null}" Stroke="#FF268CC1" StrokeThickness="2" RadiusX="3" RadiusY="3" x:Name="BorderRect"/>
    	<Grid Margin="5,5,5,5" x:Name="ShapeGrid"/>
    	<Rectangle Fill="{DynamicResource NodeBgFill}" StrokeThickness="1" HorizontalAlignment="Left" Margin="5,-25,0,0" VerticalAlignment="Top" Width="20" Height="20" Opacity="0" x:Name="NewActionNode" Stroke="#FF000000"/>
        <Rectangle RadiusX="3" RadiusY="3" StrokeThickness="1" HorizontalAlignment="Right" Margin="0,5,-25,0" VerticalAlignment="Top" Width="20" Height="20" Opacity="0" x:Name="NewNoteNode" Stroke="Brown" Fill="{DynamicResource NoteNodeBgFill}"/>
        <Polygon x:Name="NewdecissionNode" Stroke="Black" StrokeThickness="1" HorizontalAlignment="Right" Margin="0,-25,5,0" VerticalAlignment="Top" 
                 Fill="#FF4493DD" Opacity="0">
            <Polygon.Points>
                <Point X="0" Y="10"></Point>
                <Point X="12" Y="20"></Point>
                <Point X="24" Y="10"></Point>
                <Point X="12" Y="0"></Point>
                <Point X="0" Y="10"></Point>
            </Polygon.Points>
        </Polygon>
        <Ellipse Fill="White" StrokeThickness="1" HorizontalAlignment="Right" Margin="0,0,-22,0" VerticalAlignment="Bottom" 
                 Width="20" Height="20" Opacity="0" x:Name="StopNode" Stroke="#FF000000"/>
        <Ellipse Fill="Black" StrokeThickness="1" HorizontalAlignment="Right" Margin="0,0,-19,3" VerticalAlignment="Bottom" 
                 Width="14" Height="14" Opacity="0" x:Name="StopNodeInner" Stroke="#FF000000"/>
    	<TextBox Visibility="Visible" HorizontalAlignment="Center" Margin="5,5,5,5" x:Name="NodeTextField" VerticalAlignment="Center" Width="Auto" Height="Auto" Background="#00FFFFFF" BorderBrush="{x:Null}" FontFamily="Verdana" FontSize="15" Text="TextBox" TextAlignment="Center" TextWrapping="Wrap" AcceptsReturn="True"/>
    </Grid>
</UserControl>
